
var common = {
    callback: function(call) {
        var params = call.data
        var func = call.success
        ('function' == typeof func) && func(params)
    },
    getParam: (query, key, defVal) => {
        if ('undefined' == typeof query[key]) {
            return defVal
        } else {
            return query[key]
        }
    }
}

module.exports = common